FROM python:3.5
COPY sources.list /etc/apt/sources.list
RUN apt-get update
RUN apt-get install -y --force-yes nodejs
RUN apt-get install -y --force-yes supervisor
RUN mkdir -p /var/log/supervisor
# RUN groupadd -r uwsgi && useradd -r -g uwsgi uwsgi
WORKDIR /app
COPY requirements.txt /app
RUN pip install -r requirements.txt -i https://mirrors.aliyun.com/pypi/simple/

COPY celery_app /app/celery_app
COPY node_modules /app/node_modules
COPY sandman2 /app/sandman2
COPY mock.py /app
COPY run.py /app

EXPOSE 9090 9191
COPY supervisord.conf /etc/supervisor/conf.d/supervisord.conf
# USER uwsgi

CMD ["/usr/bin/supervisord"]
